<!DOCTYPE html>
<html>
	<head>
		<meta charset="utf-8">
		<script type="text/javascript">
			window.onload = function(){//兄弟节点
				var ull = document.getElementsByTagName('ul')[0];
				console.log(ull.childNodes.length);//7
				console.log(ull.firstChild);
				console.log(ull.firstChild.nextElementSibling);//<li>red<li>
				console.log(ull.lastChild);
				console.log(ull.lastChild.previousElementSibling);//<li>green<li>
			}
		</script>
		<title></title>
	</head>
	<body>
		<ul>
			<li>red</li>
			<li>bule</li>
			<li>green</li>
		</ul>
	</body>
</html>
